package com.minelx.sqlstructures.statements.parse.select.where;

import com.minelx.sequence.core.Match;
import com.minelx.sequence.core.StringScanner;
import com.minelx.sequence.core.ReturnMatcher;
import com.minelx.sqlstructures.common.parse.StringMatcher;

// FIXME 2021/6/24  wait for me!!!     it's total delegation
public class ValuesMatcher implements ReturnMatcher<String, StringScanner> {

	private final ReturnMatcher<String, StringScanner> matcher;

	public ValuesMatcher() {
		matcher = Match.digit().or(new StringMatcher());
	}

	@Override
	public boolean isMatch(StringScanner source) {
		return matcher.isMatch(source);
	}

	@Override
	public String onMatched(StringScanner source) {
		return matcher.onMatched(source);
	}
}
